package com.kws.merchant.mapper;

import com.kws.merchant.domain.ContractSignature;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * 合同管理-签名管理(ContractSignature)表数据库访问层
 *
 * @author yxy
 * @since 2024-10-29 15:37:31
 */

public interface ContractSignatureMapper extends BaseMapper<ContractSignature> {



    @Select("SELECT count(*) from tb_contract_signature s LEFT JOIN sys_user u on s.user_id=u.user_id where ${sql}")
    int countToTal(@Param("sql") String sql);

    @Select("SELECT  s.id,s.type,u.nick_name,s.file,s.create_time,u.user_id from tb_contract_signature s LEFT JOIN sys_user u on s.user_id=u.user_id where ${sql} limit ${sizeNum},${totalPage}")
    List<ContractSignature> getRecords(@Param("sql") String sql,@Param("sizeNum") Integer sizeNum,@Param("totalPage") Integer totalPage);
}
